package com.benmu.framework.manager.impl;

import android.content.Context;

import com.android.king.vo.MyFileItem;

import com.benmu.framework.adapter.DefaultFileAdapter;
import com.benmu.framework.adapter.DefaultImageAdapter;
import com.benmu.framework.manager.Manager;
import com.benmu.framework.model.UploadFileBean;
import com.benmu.framework.model.UploadImageBean;

import java.util.ArrayList;

public class MyFileManager extends Manager {
    /**
     * 选择多文件上传
     *
     * @param context 上线文对象
     * @param bean    Js 返回的数据集合
     */
    public static void pickFile(final Context context, UploadFileBean bean, int requestCode) {
        DefaultFileAdapter.getInstance().pickFile(context, bean,requestCode);
    }

    /**
     * 上传单张图片，裁剪
     */
    public void pickAvatar(final Context context, UploadImageBean bean, int requestCode) {
        DefaultImageAdapter.getInstance().pickAvatar(context, bean,requestCode);
    }


    /**
     * 上传多张图片
     *
     * @param items 选择图片集合
     * @param bean  uplaod 参数对象
     */
    public static void UpMultipleFileData(Context context, ArrayList<MyFileItem> items, UploadFileBean
        bean) {
        // FilePickerBuilder.getInstance().pickFile();
        DefaultFileAdapter.getInstance().UpMultipleFileData(context, items, bean);


    }

    /**
     * 打开照相器 拍照
     */
    public void openCamera(Context context, UploadImageBean
        bean) {
        DefaultImageAdapter.getInstance().openCamera(context, bean);
    }
}
